fix(nanno): preserve user-requested field order in AnnotationSourceTSV#402
fix(nanno): preserve user-requested field order in AnnotationSourceTSV#402holmeso merged 4 commits intonanno_multi_genefrom
Conversation
…requested field order Co-authored-by: holmeso <7066552+holmeso@users.noreply.github.com>
|
@copilot this causes a failure in a qannotate test |
…test expectations - Revert --enable-preview from build.gradle (List.getFirst/getLast are standard Java 21, not preview) - Revert --enable-preview from AnnotateTest.java Executor call - Update jsonInputsTSV expected value to match user-requested field order (aaref,HGVSc_VEP,HGVSp_VEP) with LinkedHashMap - Fix Executor.java: use getJavaPath() instead of literal "java", remove shell-style quotes from classpath (ProcessBuilder does not use a shell), switch array/jvmArgs constructors to ProcessBuilder Co-authored-by: holmeso <7066552+holmeso@users.noreply.github.com>
Fixed in commit
|
|
@copliot please take out the changes to Executor - I will put them in a future PR |
|
@copilot please review the previous comment |
Co-authored-by: holmeso <7066552+holmeso@users.noreply.github.com>
Done in
Reviewed and applied in |
Description
AnnotationSourceTSV.getHeaderNameAndPositionspreviously used aHashMap, which made iteration order non-deterministic when buildingfieldNames/fieldPositions. This could mismatch the user-requested field order andemptyRecordResult.This PR keeps the fix focused on field ordering in nanno:
AnnotationSourceTSV.java: changedHashMaptoLinkedHashMapingetHeaderNameAndPositionsso insertion order follows the requestedfieldsorder.AnnotateTest.java: updatedjsonInputsTSVexpected output to match deterministic user-requested order (aaref,HGVSc_VEP,HGVSp_VEP).Per review feedback, earlier
Executor.javachanges were removed from this PR and will be handled in a separate PR.Type of change
How Has This Been Tested?
Targeted qannotate nanno tests for this PR scope:
AnnotationSourceTSVTest.extractFieldsFromRecordAnnotationSourceTSVTest.getHeaderNameAndPositionsAnnotateTest.jsonInputsTSVAre WDL Updates Required?
No WDL updates are required.
Checklist:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.